package com.work.shart.web.entity.classifcation;


import com.baomidou.mybatisplus.annotation.TableField;

import com.baomidou.mybatisplus.annotation.TableName;
import com.work.shart.common.mybatis.entity.BaseEntity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * <p>
 * 分类
 * </p>
 *
 * @author cong
 * @since 2022-03-10
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName("classification")
@ApiModel("类别")
public class ClassificationEntity extends BaseEntity<Long> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("类别名称")
    @TableField("name")
    @Field(type = FieldType.Text)
    private String name;

    @TableField("parent_id")
    @ApiModelProperty("类别父节点id")
    private Long parentId;

    @ApiModelProperty("排序")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty("是否热点")
    @TableField("hot_spot")
    private boolean hotSpot;

    @ApiModelProperty("点击次数")
    @TableField("click_num")
    private Long clickNum;

}
